<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Base extends CI_Controller {

	public function __construct()	{
		parent::__construct();
		$this->initTemplate();
	}

	protected $header;
	protected $templateData;
	protected $baseData;
	
	protected function getUser()	{
		$this->load->library('session');
		$user = $this->session->userdata('user');
		return $user;
	}

	protected function initTemplate(){
		$this->load->helper('url');
		$this->baseData = array(
			'BaseUrl'=>base_url(),
			'user'=>$this->getUser()
		);
		
		$this->header = $this->load->view('header',$this->baseData,true);
		
		$this->templateData = array(
			'BaseUrl'=>base_url(),
			'header'=>$this->header
		);
	}
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */